package cn.com.ribbon;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RetryRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CustomRuleConfiguration {
	@Bean
	public IRule rule(){
		//默认路由为轮询路由

		// 随机路由
		return new CustomRule();
	}
}
